Highly-Concurrent Doubly-Linked Lists

نویسندگان

  • Nitin Garg
  • Ed Zhu
  • Fabiano C. Botelho
چکیده

As file systems are increasingly being deployed on ever larger systems with many cores and multi-gigabytes of memory, scaling the internal data structures of file systems has taken greater importance and urgency. A doubly-linked list is a simple and very commonly used data structure in file systems but it is not very friendly to multi-threaded use. While special cases of lists, such as queues and stacks, have lock-free versions that scale reasonably well, the general form of a doubly-linked list offers no such solution. Using a mutex to serialize all operations remains the de-facto method of maintaining a doubly linked list. This severely limits the scalability of the list and developers must resort to ad-hoc workarounds that involve using multiple smaller lists (with individual locks) and deal with the resulting complexity of the system. In this paper, we present an approach to building highly concurrent data structures, with special focus on the implementation of highly concurrent doubly-linked lists. Dubbed “advanced doubly-linked list” or “adlist” for short, our list allows iteration in any direction, and insert/delete operations over non-overlapping nodes to execute in parallel. Operations with common nodes get serialized so as to always present a locally consistent view to the callers. An adlist node needs an additional 8 bytes of space for keeping synchronization information – this is only possible due to the use of light-weight synchronization primitives called lwlocks which are optimized for small memory footprint. A read-write lwlock occupies 4 bytes, a mutex occupies 4 bytes, and a condition variable occupies 4 bytes. The corresponding primitives of the popular pthread library occupy 56, 40 and 48 bytes respectively on the x86-64 platform. The Data Domain File System makes extensive use of adlists which has allowed for significant scaling of the system without sacrificing simplicity.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Lock-free deques and doubly linked lists

We present a practical lock-free shared data structure that efficiently implements the operations of a concurrent deque as well as a general doubly linked list. The implementation supports parallelism for disjoint accesses and uses atomic primitives which are available in modern computer systems. Previously known lock-free algorithms of doubly linked lists are either based on non-available atom...

متن کامل

Region Analysis for Race Detection

Automatic race detection of C programs requires fast, yet sufficiently precise, analysis of dynamic memory. Therefore, we present a region-based pointer analysis which seeks to identify disjoint regions of dynamically allocated objects to ensure that write accesses to the same region are always protected by the same mutexes. Our approach has been implemented within the interprocedural analyzer ...

متن کامل

Some results on the symmetric doubly stochastic inverse eigenvalue problem

‎The symmetric doubly stochastic inverse eigenvalue problem (hereafter SDIEP) is to determine the necessary and sufficient conditions for an $n$-tuple $sigma=(1,lambda_{2},lambda_{3},ldots,lambda_{n})in mathbb{R}^{n}$ with $|lambda_{i}|leq 1,~i=1,2,ldots,n$‎, ‎to be the spectrum of an $ntimes n$ symmetric doubly stochastic matrix $A$‎. ‎If there exists an $ntimes n$ symmetric doubly stochastic ...

متن کامل

Lock-Free and Practical Deques and Doubly Linked Lists using Single-Word Compare-And-Swap1

We present an efficient and practical lock-free implementation of a concurrent deque that supports parallelism for disjoint accesses and uses atomic primitives which are available in modern computer systems. Previously known lock-free algorithms of deques are either based on non-available atomic synchronization primitives, only implement a subset of the functionality, or are not designed for di...

متن کامل

The Formal Design Model of Doubly-Linked-Circular Lists (DLC-Lists)

Abstract Data Types (ADTs) are a set of highly generic and rigorously modeled data structures in type theory. Lists as a finite sequence of elements are one of the most fundamental and widely used ADTs in system modeling, which provide a standard encapsulation and access interface for manipulating large-volume information and persistent data. This paper develops a comprehensive design pattern o...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • CoRR

دوره abs/1112.1141  شماره 

صفحات  -

تاریخ انتشار 2011